﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domain.TestModel.Samples
{
    public class OrganisationRepository
    {

        private List<Organisation> _organisations = new List<Organisation>();


        public OrganisationRepository()
        {

            for (Int32 i = 0; i < 100; i++)
            {
                Guid ParentGuid = Guid.NewGuid();

                _organisations.Add(new Organisation() { Id = ParentGuid, Name = String.Format("Parent - {0}", ParentGuid) });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });

                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
                _organisations.Add(new Organisation() { ParentId = ParentGuid, Name = String.Format("Child {0} of parent {1}", i, ParentGuid), Id = Guid.NewGuid() });
            }
        }


        public IEnumerable<Organisation> GetOrganisations()
        {
            return _organisations;
        }

    }
}
